package com.hzqy.persistence.dao.epg;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.SysAreaStreetVo;
import com.hzqy.web.vo.WchatTvUserVo;
import com.hzqy.web.vo.epg.AcTelephoneVo;
import com.hzqy.web.vo.epg.WchatTvOrgVo;


@Repository
public class WchatTvOrgDao extends PersistenceDao<WchatTvUserVo, Integer> {

	public WchatTvUserVo selectINFO(Map<String, Object> map) {
		return getSqlSession().selectOne(this.getNamespace()+"selectINFO", map);
	}
	
	public int updateService(WchatTvUserVo wchatTvOrgVo) {
		return getSqlSession().update(this.getNamespace()+"updateService", wchatTvOrgVo);
	}
	
	public int updateStatus(WchatTvUserVo wtOrgVo) {
		return getSqlSession().update(this.getNamespace()+"updateStatus", wtOrgVo);
	}
	
	public int insertWchatTvUserInfo(WchatTvUserVo wchatTvUserVo) {
		return getSqlSession().insert(this.getNamespace()+"insertWchatTvUserInfo", wchatTvUserVo);
	}
	
	public int insertWchatTvGameOrgInfo(WchatTvOrgVo wchatTvOrgVo) {
		return getSqlSession().insert(this.getNamespace()+"insertWchatTvGameOrgInfo", wchatTvOrgVo);
	}
	
	public WchatTvUserVo selectWchatTvUserInfo(Map<String,Object> map) {
		return getSqlSession().selectOne(this.getNamespace()+"selectWchatTvUserInfo", map);
	}
	
	public WchatTvUserVo selectWchatTvUserInfoByServiceId(Map<String,Object> map) {
		return getSqlSession().selectOne(this.getNamespace()+"selectWchatTvUserInfoByServiceId", map);
	}

	public WchatTvUserVo selectPhone(String f_wtut_serverid){
		return getSqlSession().selectOne(this.getNamespace()+"selectPhone",f_wtut_serverid);
	}
	
	public int selectByPhone(String f_wtut_phone){
		return getSqlSession().selectOne(this.getNamespace()+"selectByPhone",f_wtut_phone);
	}

	public int selectByIPTV(String f_wtut_serverid){
		return getSqlSession().selectOne(this.getNamespace()+"selectByIPTV",f_wtut_serverid);
	}
	
	public AcTelephoneVo selectPhoneINFO(String f_apb_user) {
		Map<String,String> map = new HashMap<String, String>();
		map.put("f_apb_user", f_apb_user);
		return getSqlSession().selectOne(this.getNamespace()+"selectPhoneINFO", map);
	}

	public int updateAcTelPhone(AcTelephoneVo insertVo) {
		return getSqlSession().update(this.getNamespace()+"updateAcTelPhone", insertVo);
	}

	public SysAreaStreetVo selectAreaID(String areaName) {
		Map<String,String> map = new HashMap<String, String>();
		map.put("f_sas_name", areaName);
		return getSqlSession().selectOne(this.getNamespace()+"selectAreaID", map);
	}
}
